package yf.mall.dao;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import yf.mall.entity.AppProductMaterialEntity;
import yf.mall.entity.custom.CountMap;
import yf.mall.vo.AppProductMaterialVo;
import org.apache.ibatis.annotations.Mapper;
import com.yf.dao.BaseDao;
import java.util.List;
import java.util.Map;

/**
 * 商品素材关联表Dao
 *
 * 
 * 
 * @date Tue Jul 18 14:30:26 CST 2023
 */
@Mapper
public interface AppProductMaterialDao extends BaseDao<AppProductMaterialEntity> {

    List<AppProductMaterialVo> findVo(AppProductMaterialVo vo);

    AppProductMaterialVo getVo(Long id);

    /**
     * 通过产品id统计素材数
     * @param pids
     * @return
     */
    List<CountMap> getPidCountMap(@Param("pids") List<Long> pids);


    @Select("select  distinct  pid from  app_product_material")
    List<Long> findPidList();
}
